#启用
#分类放置项目工程
if(MSVC)
    set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakePredefineTargets")
    set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif(MSVC)
#把target归类到一个筛选器中
# usage:
# 		 cmake_language(CALL V_SET_TARGET_FOLDER foldername <tgt1> [tgt2 ...])
function(add_project_folder folder tgt )
    if(${ARGC} LESS 2 OR (NOT MSVC)) 
        message(WARING "V_SET_TARGET_FOLDER params is too few! ")
    endif( )
    list(APPEND tgt_list ${tgt} ${ARGN})
    set_property(TARGET ${tgt_list} PROPERTY FOLDER ${folder})
endfunction()

#target里文件归类
#source_group(<name> [FILES <src>...] [REGULAR_EXPRESSION <regex>])
#source_group(TREE <root> [PREFIX <prefix>] [FILES <src>...])